package pl.sedek.com.db;

import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.PreparedStatement;
import com.mysql.jdbc.Statement;

public class MySQLConnector {
	private Connection connect = null;

	private PreparedStatement preparedStatement = null;


	/*
	 * Tajne
	 */

	static final String host = "sedek.com.pl";
	static final String dbname = "lukaszse_orie";
	static final String user = "lukaszse_orie";
	static final String password = "orientacja";

	public Connection getMySQLConnection() {
		try {
			Class.forName("com.mysql.jdbc.Driver");
			connect = (Connection) DriverManager.getConnection("jdbc:mysql://"
					+ host + "/" + dbname + "?" + "user=" + user + "&password="
					+ password);
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (SQLException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return connect;
	}
}
